<table width="300" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="101">NIM</td>
    <td width="11">:</td>
    <td width="98"><?php echo $row->nim;?></td>
  </tr>
  <tr>
    <td>Nama</td>
    <td>:</td>
    <td><?php echo $row->nama; ?></td>
  </tr>
  <tr>
    <td>Tanggal Pinjam</td>
    <td>:</td>
    <td><?php echo $row->tgl_pinjam; ?>
	</td>
  </tr>
    <tr>
    <td>Tanggal Harus Kembali</td>
    <td>:</td>
    <td><?php echo $row->tgl_hrs_kembali; ?></td>
  </tr>
  <tr>
    <td>Keterlambatan</td>
    <td>:</td>
    <td><?php echo $hari; ?> Hari</td>
  </tr>
    <tr>
    <td>Denda</td>
    <td>:</td>
    <td>Rp.<?php echo $tagihan; ?>.00</td>
  </tr>
</table>

<br>
<form action="" name="kembali" method="post" id="kembali">
<input type="hidden" name="denda" value="<?php echo $tagihan ?>">
<table width="655" border="0" cellpadding="0" cellspacing="0" class="table">
  <tr>
    <th width="21">No</th>
    <th width="72">Kode Buku</th>
	<th width="92">Nomer Buku</th>
    <th width="130">Judul Buku</th>
     <th width="74">Penerbit</th>
	 <th width="72">Pengarang</th>
	  <th width="72">Aksi</th>
  </tr>
  <input type="hidden" name="tgl_pinjam" value="<?php echo $row->tgl_pinjam ?>">
  <input type="hidden" name="id_peminjaman" value="<?php echo $row->id_peminjaman ?>">
    <input type="hidden" name="id_member" value="<?php echo $row->id_member ?>">
  <?php 
  $i=1;  
  foreach ($query as $row){ ?>


  <tr class="<?php if ($i %2 == 0) echo 'zebra'; ?>">
    <td><?php echo $i ?></td>
    <td><?php echo $row['kode_buku'] ?></td>
	<td><?php echo $row['no_buku'] ?></td>
    <td><?php echo $row['judul'] ?></td>
	<input type="hidden" name="buku<?php echo $i ?>" value="<?php echo $row['id_buku'] ?>">
    <td><?php echo $row['nama_penerbit'] ?></td>
	 <td><?php echo $row['pengarang'] ?></td>
	 <td><?php echo anchor ('peminjaman/edit/'.$row['id_detail'].'/'.$row['id_member'],'Edit') ?> |
	 <a href="<?php echo base_url().'peminjaman/delete/'.$row['id_detail'].'/'.$row['id_peminjaman'] ?>">Delete</a></td>
  </tr>

  <?php
  $i++;
  } ?>
  <tr>
    <td>&nbsp;</td>
    <td></td>
    <td></td>
    <td>&nbsp;</td>
  </tr>
</table>
<input type="submit" name="pengembalian" id="pengembalian" value="Pengembalian Buku">
</form>